package openfidias.maker

import openfidias.maker.model.Model
import openfidias.maker.model.ModelMaker
import openfidias.maker.model.Attribute
import openfidias.maker.controller.DataAccess
import org.json.JSONObject as JsonObj

/**
 *
 * @author atila
 */
class MainTests {
   public static void main(String[] args) {
      /*def attrs = [
          new Attribute(name:'user', type:"String"),
          new Attribute(name:'passwd', type:"String")
      ]      
      def model = new Model(_class:"user", attributes:attrs)
      def maker = new ModelMaker()
      maker.make(model)*/

      def maker = new ModelMaker()
      def model = maker.make("openfidias.maker.pessoa nome:String fone:long endereco:String")

      def dao = new DataAccess(model)
      println dao.singleton()
      println dao.create()
      println dao.delete()
   }
}

